package com.manage.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.manage.platform.dto.UserDto;
import com.manage.platform.dto.query.UserPageQuery;
import com.manage.platform.entity.UserEntity;
import com.manage.platform.po.UserPo;
import com.manage.platform.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * YWD
 * 2025/9/18
 */
@Mapper
public interface UserMapper extends BaseMapper<UserEntity> {

    UserPo getUserInfo(@Param("id") Long id, @Param("userName") String userName);

    List<UserVo> getUserPage(@Param("query") UserPageQuery query);

    UserVo getUserDetails(@Param("id") Long id);

    String getUserByPhone(@Param("id") Long id, @Param("phone") String phone);

    Boolean saveUser(@Param("dto") UserDto dto);

    List<UserEntity> getByDepartmentId(@Param("departmentId") Long departmentId);

    List<OrganizeMemberPartVo> getUserList(@Param("realName") String realName);
}
